home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
pbc32.zip
/
PBC$BAS.ZIP
/
PARSEFSP.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-04-10
|
1KB
|
35 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone (C) Copyright 1996 Charon Software, All Rights Reserved |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB RInstr (MainSt$, SubSt$, Posn%)
SUB ParseFSpec (FileSpec$, Drive$, DLen%, Subdir$, SLen%, File$, FLen%)
F$ = FileSpec$
IF MID$(F$, 2, 1) = ":" THEN
MID$(Drive$, 1) = LEFT$(F$, 1)
DLen% = 1
F$ = MID$(F$, 3)
ELSE
DLen% = 0
END IF
RInstr F$, "\", Place%
IF Place% THEN
IF Place% = 1 THEN
MID$(Subdir$, 1) = "\"
SLen% = 1
ELSE
MID$(Subdir$, 1) = LEFT$(F$, Place% - 1)
SLen% = Place% - 1
END IF
MID$(File$, 1) = MID$(F$, Place% + 1)
FLen% = LEN(MID$(F$, Place% + 1))
ELSE
SLen% = 0
MID$(File$, 1) = F$
FLen% = LEN(F$)
END IF
END SUB